#define  _CRT_SECURE_NO_WARNINGS  1
#include <stdio.h>
int main()
{
	int n;
	scanf("%d", &n);

	int x;
	x = n % 5;
	if (x == 0)
	{
		printf("YES");
	}
	else
	{
		printf("NO");
	}

	return 0;
}